﻿// <copyright file="AnalyticsEventArgs.cs" company="Microsoft Corporation">
// Copyright (c) 2009 Microsoft Corporation All Rights Reserved
// </copyright>
// <author>Michael S. Scherotter</author>
// <email>mischero@microsoft.com</email>
// <date>2009-10-17</date>
// <summary>AnalyticsEventArgs class definition</summary>

namespace Microsoft.WebAnalytics
{
    using System;

    /// <summary>
    /// An analytics event argument
    /// </summary>
    public class AnalyticsEventArgs : EventArgs
    {
        /// <summary>
        /// Initializes a new instance of the AnalyticsEventArgs class
        /// </summary>
        /// <param name="analyticsEvent">the analytics event</param>
        /// <param name="isFromCache">true if the event was cached</param>
        public AnalyticsEventArgs(AnalyticsEvent analyticsEvent, bool isFromCache)
        {
            this.AnalyticsEvent = analyticsEvent;
            this.IsFromCache = isFromCache;
        }

        /// <summary>
        /// Gets the analytics event
        /// </summary>
        public AnalyticsEvent AnalyticsEvent { get; private set; }

        /// <summary>
        /// Gets a value indicating whether the analytics event was from the event cache
        /// </summary>
        public bool IsFromCache { get; private set; }
    }
}
